//
//  MyJiFenTableViewCell.m
//  JiuJiuShangCheng
//
//  Created by jiujiukeji on 2018/7/17.
//  Copyright © 2018年 jiujiukeji. All rights reserved.
//

#import "MyJiFenTableViewCell.h"

@implementation MyJiFenTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self setUpUI];
    }
    return self;
}
- (void)setUpUI
{
    self.textLB = [UILabel labelWithText:@"每日签到获取积分" textColor:UIColorFromRGB(0x333333) fontSize:14];
    [_textLB sizeToFit];
    [self addSubview:_textLB];
    [_textLB mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self).offset(rateWidth(25));
        make.top.equalTo(self).offset(rateHeight(20));
    }];
    
    self.timeLB = [UILabel labelWithText:@"操作时间：2018-07-07 12:12" textColor:UIColorFromRGB(0x666666) fontSize:14];
    [_timeLB sizeToFit];
    [self addSubview:_timeLB];
    [_timeLB mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.textLB);
        make.top.equalTo(self.textLB.mas_bottom).offset(rateHeight(10));
    }];
    
    self.numLB = [UILabel labelWithText:@"+0.01" textColor:UIColorWhite fontSize:14 bgColor:navBarColor cornerRadius:5];
    [self addSubview:_numLB];
    [_numLB mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self);
        make.right.equalTo(self).offset(-rateWidth(20));
        make.size.mas_offset(CGSizeMake(rateWidth(110), rateHeight(55)));
    }];
    
    UIView *line = [[UIView alloc] init];
    line.backgroundColor = globalGray;
    [self addSubview:line];
    [line mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.bottom.equalTo(self);
        make.height.equalTo(@(rateHeight(1)));
    }];
}

@end
